package com.zbj.feign.consumer;

import org.springframework.stereotype.Component;

/**
 * FeignFallBack
 * Feign声明式调用服务下服务降级的使用，那么我们就必须新建一个FeignFallBack类来继承FeignService
 *
 * @author weigang
 * @create 2019-08-06
 **/
@Component
public class FeignFallBack implements FeignService {

    @Override
    public String hello() {
        return "error";
    }

    @Override
    public String hello(String name) {
        return "error";
    }

    @Override
    public User hello(String name, Integer age) {
        return new User();
    }

    @Override
    public String hello(User user) {
        return "error";
    }
}